Learn R Programming

ContaminatedMixt (version 1.3.8)

Extractor functions: Extractors for ContaminatedMixt Class Objects.

Description

These functions extract values from ContaminatedMixt class objects.

Usage

getBestModel(object, criterion = "BIC", G = NULL, model = NULL, 
            contamination = NULL)
getPosterior(object, ...)
getSize(object, ...)
getCluster(object, ...)
getPar(object, ...)
getCV(object)
getIC(object,criteria)
getDetection(object,...)
whichBest(object, criteria = NULL, G = NULL, model = NULL,
  contamination = NULL)
whichBestCV (object, G=NULL, model=NULL, contamination=NULL)
# S3 method for ContaminatedMixt
summary(object, criterion = "BIC", 
  digits = getOption("digits")-2, ...)
# S3 method for ContaminatedMixt
print(x, ...)

Arguments

object, x

a class ContaminatedMixt object or a a class ContaminatedMixt object for getCV and whichBestCV.

criterion

a string with the information criterion to consider; supported values are: "AIC", "AICc", "AICcond", "AICu", "AIC3", "AWE", "BIC", "CAIC", "ICL". Default value is "BIC".

criteria

a vector of strings with the names of information criteria to consider. If NULL, all the supported information criteria are considered.

G

an optional vector containing the numbers of groups to consider. If not specified, all the estimated models are considered.

model

an optional vector of character strings indicating the parsimonious models to consider. If not specified, all the estimated models are considered.

contamination

an optional boolean indicating if the model(s) to be considered have to be contaminated or not. If NULL, then both types of models are considered.

digits

integer used for number formatting.

...

additional arguments to be passed to getBestModel (or to whichBest for the print method).

Details

When several models have been estimated, these functions consider the best model according to the information criterion in criterion, among the estimated models having a number of components among those in G and a parsimonious model among those in model. whichBestCV considers the best model according to the cross-validated error rates computed by CNmixtCV. getIC provides values for the information criteria in criteria.

The getBestModel method returns a ContaminatedMixt object containing the best model only, selected as described above.